package com.example.member.model

import com.example.common.view.model.BaseRepository
import com.example.common.view.model.BaseResultData
import com.example.member.entity.MemberEntity
import com.example.member.entity.MembershipEntity
import com.example.memberships.api.MemberApiService
import javax.inject.Inject

class MemberRepository @Inject constructor(private val apiService: MemberApiService): MemberApiService{
    override suspend fun getMember(userId: Int): BaseResultData<MemberEntity> {
        return apiService.getMember(userId)
    }

    override suspend fun getMemberUp(
        newMembershipLevel: String,
        userId: Int
    ): BaseResultData<MemberEntity> {
        return apiService.getMemberUp(newMembershipLevel, userId)
    }

    override suspend fun getMembership(id: Int): BaseResultData<List<MembershipEntity>> {
        return apiService.getMembership(id)
    }

}